﻿using System;
using System.Collections.Generic;
using System.Collections;
using System.Linq;
using System.Text;

namespace Factory
{
    public abstract class Pizza
    {
        
        protected string name;
        protected string dough;
        protected string sauce;
        protected ArrayList toppings = new ArrayList();    
        
        public Pizza()
        { 
        
        }
      
        public void Prepare()
        {
            StringBuilder sb = new StringBuilder();

            sb.Append("Preparing " + name + "\n");
            sb.Append("Tossing " + dough + "\n");
            sb.Append("Adding " + sauce + "\n");
            sb.Append("Adding toppings:" + "\n");

            foreach (string topping in toppings)
            {
                sb.Append("\t" + topping + "\n");
            }

            Console.WriteLine( sb.ToString());
        }
    
        public virtual void Bake()
        {
            Console.WriteLine("Bake for 25 minutes at 350 \n");
            
        } 
        public virtual void Cut()
        {
            Console.WriteLine("Cutting the pizza into diagonal slices \n");
        }
        public virtual void Box()
        {
            Console.WriteLine("Place pizza in official PizzaStore box \n");
        }
        public string GetName()
        {
            return name;
        }
    }
}
